/*
 * Copyright (c) 2012 Skyon Technology Ltd.
 * All rights reserved.
 *
 * project: BpocDemo
 * create: 2012-3-1 ����05:17:17
 * cvs: $Id: $
 */
package cn.batch.daemon.blazeServer;

import com.blazesoft.server.base.NdServerException;
import com.blazesoft.server.base.NdServiceException;
import com.blazesoft.server.base.NdServiceSessionException;
import com.blazesoft.server.config.NdServerConfig;
import com.blazesoft.server.deploy.NdStatelessServer;
import com.blazesoft.server.local.NdLocalServerException;

//==> Import Application specific code here

/**
 * This class implements a stateless server based on RuleServiceDefinition It is
 * a subclass of <code>com.blazesoft.server.deploy.NdStatelessServer</code>.
 * 风险预警规则调用服务类
 */
public class RiskWarningServer extends NdStatelessServer

{
	/**
	 * Constructor. Calls the constructor of the superclass.
	 * 
	 * @param serverConfig
	 *            Server configuration to use
	 * 
	 * @exception NdLocalServerException
	 *                if construction of the server fails.
	 */
	public RiskWarningServer(NdServerConfig serverConfig)
			throws NdLocalServerException {
		super(serverConfig);
	}

	/**
	 * Invokes a server through the entry point "entry" in the service "entry".
	 * 
	 * @param arg0
	 *            ==> Enter a description here
	 * @return String ==> Enter a description of the return value
	 */
	// public String entry(String arg0)
	// throws NdServerException, NdServiceException, NdServiceSessionException
	// {
	// // Build the argument list
	// Object[] applicationArgs = new Object[1];
	// applicationArgs[0] = arg0;
	//
	//
	// // Invoke the service and returns its result, if any.
	// String retVal = (String)invokeService("entry", "entry", null,
	// applicationArgs);
	// return retVal;
	// }

	/**
	 * Invokes a server through the entry point "ExternalMain" in the service
	 * "RuleServiceDefinition".
	 * 
	 * @param arg0
	 *            ==> Enter a description here
	 * @return String ==> Enter a description of the return value
	 */
	public String yjDEntry(String arg0) throws NdServerException,
			NdServiceException, NdServiceSessionException {
		// Build the argument list
		Object[] applicationArgs = new Object[1];
		applicationArgs[0] = arg0;

		// Invoke the service and returns its result, if any.
		String retVal = (String) invokeService("entry", "yjDEntry", null,
				applicationArgs);
		return retVal;
	}

	public String yjMEntry(String arg0) throws NdServerException,
			NdServiceException, NdServiceSessionException {
		// Build the argument list
		Object[] applicationArgs = new Object[1];
		applicationArgs[0] = arg0;

		// Invoke the service and returns its result, if any.
		String retVal = (String) invokeService("entry", "yjMEntry", null,
				applicationArgs);
		return retVal;
	}

	public String checkPboc(String arg0) throws NdServerException,
			NdServiceException, NdServiceSessionException {
		// Build the argument list
		Object[] applicationArgs = new Object[1];
		applicationArgs[0] = arg0;

		// Invoke the service and returns its result, if any.
		String retVal = (String) invokeService("entry", "checkPboc", null,
				applicationArgs);
		return retVal;
	}
	
	public String checkPboc2(String arg0) throws NdServerException,
			NdServiceException, NdServiceSessionException {
		// Build the argument list
		Object[] applicationArgs = new Object[1];
		applicationArgs[0] = arg0;

		// Invoke the service and returns its result, if any.
		String retVal = (String) invokeService("entry", "checkPboc2", null,
				applicationArgs);
		return retVal;
	}

}
